package com.ziq.zcamp.bean.activities

import com.blankj.utilcode.util.GsonUtils
import com.ziq.zcamp.bean.place.VrInfo
import com.ziq.zcamp.bean.post.ImageInfo
import com.ziq.zcamp.proguard.ProguardKeep
import java.io.Serializable

class ActivitiesInfo : ProguardKeep, Serializable {

    var status :Int ?= null
    var id :Long? = null
    var title :String ?= null
    var pictures :String ?= null
    var images : List<ImageInfo>? = null
    var location_addr :String ?= null
    var longitude : String? = null
    var latitude : String? = null
    var start_time : Long ? = null
    var end_time : Long ?= null
    var content_intro: String? = null
    var content: String? = null
    var phone : String ?= null


    //特殊活动标识。(新版本标识)，0收费——在觅野售票；1免费；2收费，不在觅野售票
    var free_type : Int ?= null
    var organizer : ActivitiesOrganizerInfo?= null
    var price_range : List<Int> ?= null
    var related_camp : ActivitiesCampInfo?=null
    var content_detail : List<ActivitiesContentInfo> ?= null
    var other_info : ActDetailsOtherInfo?= null

    //活动结束时间（展示）
    var end_show_time : String ?= null
    //活动开始时间(展示)
    var start_show_time : String ?= null
    //活动状态 1-可预定 2-已售罄 3-已结束
    var act_status : Int ?= null

    var vr : VrInfo? = null
    var is_identity : Int? = null //是否需要填身份证，0否1是

    fun parseData(){
        var imageList: List<ImageInfo> =  mutableListOf<ImageInfo>()
        if (pictures?.isNotEmpty() == true){
            pictures?.let {
                imageList = GsonUtils.fromJson(it, GsonUtils.getListType(
                    ImageInfo::class.java))
            }
        }
        images = imageList
    }

}